<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/1/8
 * Time: 13:33
 */

namespace Modules\Shop\Http\Controllers;

use Illuminate\Support\Facades\Request;
use Modules\Shop\Service\InvoiceService;

class InvoiceController extends BaseController
{

    /**
     *	获取所有的发票申请列表
     *	hinq 2019 11 19
     *
     **/
    public function index(){
        $arr_search = (array)Request::input();
        $arr_list = InvoiceService::get_list( (array) $arr_search );
        echo_error($arr_list);
        return view('shop::invoice.index',$arr_list['data']);
    }

    /**
     *	获取指定的发票的详细信息
     *	hinq 2019 11 20
     *
     **/
    public function detail(){
        $arr_search = (array)Request::input();
        $arr_list = InvoiceService::detail( (array) $arr_search );
        return view('shop::invoice.detail',['info'=>$arr_list]);
    }

    /**
     *	获取指定的发票关联的订单信息
     *	hinq 2019 11 20
     *
     **/
    public function goods_order(){
        $arr_search = (array)Request::input();
        $arr_list = InvoiceService::goods_order( (array) $arr_search );
        return $arr_list;
    }

    /**
     *	确认发送发票信息
     *	hinq 2019 11 20
     *
     **/
    public function check_order(){
        $arr_search = (array)Request::input();
        $arr_list = InvoiceService::check_order( (array) $arr_search );
        return $arr_list;
    }
}